package com.bxw.forum.dao;

import com.bxw.forum.model.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int insert(Message row);

    int insertSelective(Message row);

    Message selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Message row);

    int updateByPrimaryKey(Message row);

    int selectUnreadCount(@Param("receiveUserId")Long receiveUserId);

    List<Message> selectByReceiveUserId(@Param("receiveUserId")Long receiveUserId);

    Message selectByPostToReceive(@Param("postUserId") Long postUserId,@Param("receiveUserId") Long receiveUserId);
}